<?php

namespace app\controller;

use app\BaseController;
use app\service\DeliveryOrderService;
use think\facade\Request;

/**
 * 车辆管理
 */
class Delivery extends BaseController
{

    public function lists()
    {
        $uid = Request::param('uid/d', 0);
        $param['uid'] = $uid;
        $param['delivery_no'] = Request::param('delivery_no/s', '');
        $param['stime'] = Request::param('stime/s', '');
        $param['etime'] = Request::param('etime/s', '');
        $param['car_id'] = Request::param('car_id/d', 0);
        $param['delivery_status'] = Request::param('delivery_status/d', 0);
        $param['task_id'] = Request::param('task_id/d', 0);
        $param['network_ids'] = Request::param('network_ids/s', '');
        $param['net_name'] = Request::param('net_name/s', '');
        $param['driver_name'] = Request::param('driver_name/s', '');
        $param['car_no'] = Request::param('car_no/s', '');
        $param['page'] = Request::param('page/d', 0);
        $param['limit'] = Request::param('limit/d', 10);
        $param['is_export'] = Request::param('is_export');
        $lists = DeliveryOrderService::lists($param);
        returnSuccess(200, '获取成功', $lists);
    }


    public function order_lists()
    {

        $uid = Request::param('uid/d', 0);
        $param['uid'] = $uid;
        $param['delivery_id'] = Request::param('delivery_id/s', '');
        $param['page'] = Request::param('page/d', 0);
        $param['limit'] = Request::param('limit/d', 10);
        $lists = DeliveryOrderService::oms_order_lists($param);
        returnSuccess(200, '获取成功', $lists);
    }

}